import NftEggsNFT from "../contracts/NftEggsNFT.cdc"

// 读取指定地址拥有的NFT列表
pub fun main(account: Address): [UInt64] {
    let collectionRef = getAccount(account)
        .getCapability(/public/NFTCollection)
        .borrow<&{NftEggsNFT.NftEggsNFTCollectionPublic}>()
        ?? panic("Could not borrow capability from public collection")

    return collectionRef.getIDs()
}
